library(ggplot2)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
d203 <- read.csv("../data/d203.csv", stringsAsFactors = FALSE)

Let’s look at one dataset, understand its attributes and do some processing.

d203

To obtain information of the columns, we need the metadata file. So we download the metadata file for this dataset from KNB.

dataset_w_pop <- read.csv("../data/pop_ds.csv", stringsAsFactors = FALSE)
library(XML)
library(dataone)
id <- dataset_w_pop[203, 3]
# get the node of this metadata using `dataOne` package
locations <- resolve(cn, id)
mnId <- locations$data[2, "nodeIdentifier"]
mn <- getMNode(cn, mnId)

# download the metadata file to find the data table
metadata <- rawToChar(getObject(mn, id))
doc = xmlRoot(xmlTreeParse(metadata, asText=TRUE, trim = TRUE, ignoreBlanks = TRUE))
saveXML(doc, file="d203.xml")

Overview of the dataset

From the metadata file, we obtain the following information:
## About the organization
PISCO is a large-scale marine research program that focuses on understanding the near-shore ecosystems of the U.S. West Coast. An interdisciplinary collaboration of scientists from four universities, PISCO integrates long-term monitoring of ecological and oceanographic processes at dozens of coastal sites with experimental work in the lab and field. We explore how individual organisms, populations, and ecological communities vary over space and time. Findings are applied to issues of ocean conservation and management, and are shared through our public outreach and student training programs.

Data Collection

These data were collected by PISCO to understand the physical processes of the inner continental shelf and their potential effects on marine ecology.

This metadata record describes bottom-mounted ADCP data collected at Fogarty Creek, Oregon, USA, by PISCO. Measurements were collected using an RDI 600 kHz Workhorse Sentinel ADCP beginning 2002-08-02. The instrument depth was 014 meters, in an overall water depth of 15 meters (both relative to Mean Sea Level, MSL). The instrument was programmed with a sampling interval of 2.0 minutes and a vertical resolution of 1 meter.

Fogarty Creek (ADCP) 15m: FC15C: The nearshore mooring is located offshore of Fogarty Creek, approximately 4km South West of the onshore Lincoln Beach site, about 3.6km North of Depoe Bay, Oregon, USA. The base of the mooring is in 15 meters of water below Mean Sea Level (MSL), and it extends up to 4 meters below MSL. The altitudeMinimum and altitudeMaximum tags in this initial coverage section refer to the ADCP measurement range and are also referenced to MSL. They do not represent the overall water depth. Note the nominal range of the ADCP may extend from near-bottom (a depth expressed as a negative altitude) to slightly above MSL (a height expressed as a positive altitude)

-124.074776 -124.074776 44.841800 44.841800 -014 9 meter

Methods for PISCO bottom-mounted ADCP data collection and quality-control are available online, see the protocol citation. Data were collected using an RDI 600 kHz Workhorse Sentinel ADCP set to 40 pings per 2.0-minute ensemble, with a vertical resolution of 1 meter.

Data Attributes

Analyzing Attributes

Now let’s take a closer look at the attributes to see what happens to them over time.

unique(d203$time)
##   [1] "19:02:03.00Z" "19:04:03.00Z" "19:06:03.00Z" "19:08:03.00Z"
##   [5] "19:10:03.00Z" "19:12:03.00Z" "19:14:03.00Z" "19:16:03.00Z"
##   [9] "19:18:03.00Z" "19:20:03.00Z" "19:22:03.00Z" "19:24:03.00Z"
##  [13] "19:26:03.00Z" "19:28:03.00Z" "19:30:03.00Z" "19:32:03.00Z"
##  [17] "19:34:03.00Z" "19:36:03.00Z" "19:38:03.00Z" "19:40:03.00Z"
##  [21] "19:42:03.00Z" "19:44:03.00Z" "19:46:03.00Z" "19:48:03.00Z"
##  [25] "19:50:03.00Z" "19:52:03.00Z" "19:54:03.00Z" "19:56:03.00Z"
##  [29] "19:58:03.00Z" "20:00:03.00Z" "20:02:03.00Z" "20:04:03.00Z"
##  [33] "20:06:03.00Z" "20:08:03.00Z" "20:10:03.00Z" "20:12:03.00Z"
##  [37] "20:14:03.00Z" "20:16:03.00Z" "20:18:03.00Z" "20:20:03.00Z"
##  [41] "20:22:03.00Z" "20:24:03.00Z" "20:26:03.00Z" "20:28:03.00Z"
##  [45] "20:30:03.00Z" "20:32:03.00Z" "20:34:03.00Z" "20:36:03.00Z"
##  [49] "20:38:03.00Z" "20:40:03.00Z" "20:42:03.00Z" "20:44:03.00Z"
##  [53] "20:46:03.00Z" "20:48:03.00Z" "20:50:03.00Z" "20:52:03.00Z"
##  [57] "20:54:03.00Z" "20:56:03.00Z" "20:58:03.00Z" "21:00:03.00Z"
##  [61] "21:02:03.00Z" "21:04:03.00Z" "21:06:03.00Z" "21:08:03.00Z"
##  [65] "21:10:03.00Z" "21:12:03.00Z" "21:14:03.00Z" "21:16:03.00Z"
##  [69] "21:18:03.00Z" "21:20:03.00Z" "21:22:03.00Z" "21:24:03.00Z"
##  [73] "21:26:03.00Z" "21:28:03.00Z" "21:30:03.00Z" "21:32:03.00Z"
##  [77] "21:34:03.00Z" "21:36:03.00Z" "21:38:03.00Z" "21:40:03.00Z"
##  [81] "21:42:03.00Z" "21:44:03.00Z" "21:46:03.00Z" "21:48:03.00Z"
##  [85] "21:50:03.00Z" "21:52:03.00Z" "21:54:03.00Z" "21:56:03.00Z"
##  [89] "21:58:03.00Z" "22:00:03.00Z" "22:02:03.00Z" "22:04:03.00Z"
##  [93] "22:06:03.00Z" "22:08:03.00Z" "22:10:03.00Z" "22:12:03.00Z"
##  [97] "22:14:03.00Z" "22:16:03.00Z" "22:18:03.00Z" "22:20:03.00Z"
## [101] "22:22:03.00Z" "22:24:03.00Z" "22:26:03.00Z" "22:28:03.00Z"
## [105] "22:30:03.00Z" "22:32:03.00Z" "22:34:03.00Z" "22:36:03.00Z"
## [109] "22:38:03.00Z" "22:40:03.00Z" "22:42:03.00Z" "22:44:03.00Z"
## [113] "22:46:03.00Z" "22:48:03.00Z" "22:50:03.00Z" "22:52:03.00Z"
## [117] "22:54:03.00Z" "22:56:03.00Z" "22:58:03.00Z" "23:00:03.00Z"
## [121] "23:02:03.00Z" "23:04:03.00Z" "23:06:03.00Z" "23:08:03.00Z"
## [125] "23:10:03.00Z" "23:12:03.00Z" "23:14:03.00Z" "23:16:03.00Z"
## [129] "23:18:03.00Z" "23:20:03.00Z" "23:22:03.00Z" "23:24:03.00Z"
## [133] "23:26:03.00Z" "23:28:03.00Z" "23:30:03.00Z" "23:32:03.00Z"
## [137] "23:34:03.00Z" "23:36:03.00Z" "23:38:03.00Z" "23:40:03.00Z"
## [141] "23:42:03.00Z" "23:44:03.00Z" "23:46:03.00Z" "23:48:03.00Z"
## [145] "23:50:03.00Z" "23:52:03.00Z" "23:54:03.00Z" "23:56:03.00Z"
## [149] "23:58:03.00Z" "00:00:03.00Z" "00:02:03.00Z" "00:04:03.00Z"
## [153] "00:06:03.00Z" "00:08:03.00Z" "00:10:03.00Z" "00:12:03.00Z"
## [157] "00:14:03.00Z" "00:16:03.00Z" "00:18:03.00Z" "00:20:03.00Z"
## [161] "00:22:03.00Z" "00:24:03.00Z" "00:26:03.00Z" "00:28:03.00Z"
## [165] "00:30:03.00Z" "00:32:03.00Z" "00:34:03.00Z" "00:36:03.00Z"
## [169] "00:38:03.00Z" "00:40:03.00Z" "00:42:03.00Z" "00:44:03.00Z"
## [173] "00:46:03.00Z" "00:48:03.00Z" "00:50:03.00Z" "00:52:03.00Z"
## [177] "00:54:03.00Z" "00:56:03.00Z" "00:58:03.00Z" "01:00:03.00Z"
## [181] "01:02:03.00Z" "01:04:03.00Z" "01:06:03.00Z" "01:08:03.00Z"
## [185] "01:10:03.00Z" "01:12:03.00Z" "01:14:03.00Z" "01:16:03.00Z"
## [189] "01:18:03.00Z" "01:20:03.00Z" "01:22:03.00Z" "01:24:03.00Z"
## [193] "01:26:03.00Z" "01:28:03.00Z" "01:30:03.00Z" "01:32:03.00Z"
## [197] "01:34:03.00Z" "01:36:03.00Z" "01:38:03.00Z" "01:40:03.00Z"
## [201] "01:42:03.00Z" "01:44:03.00Z" "01:46:03.00Z" "01:48:03.00Z"
## [205] "01:50:03.00Z" "01:52:03.00Z" "01:54:03.00Z" "01:56:03.00Z"
## [209] "01:58:03.00Z" "02:00:03.00Z" "02:02:03.00Z" "02:04:03.00Z"
## [213] "02:06:03.00Z" "02:08:03.00Z" "02:10:03.00Z" "02:12:03.00Z"
## [217] "02:14:03.00Z" "02:16:03.00Z" "02:18:03.00Z" "02:20:03.00Z"
## [221] "02:22:03.00Z" "02:24:03.00Z" "02:26:03.00Z" "02:28:03.00Z"
## [225] "02:30:03.00Z" "02:32:03.00Z" "02:34:03.00Z" "02:36:03.00Z"
## [229] "02:38:03.00Z" "02:40:03.00Z" "02:42:03.00Z" "02:44:03.00Z"
## [233] "02:46:03.00Z" "02:48:03.00Z" "02:50:03.00Z" "02:52:03.00Z"
## [237] "02:54:03.00Z" "02:56:03.00Z" "02:58:03.00Z" "03:00:03.00Z"
## [241] "03:02:03.00Z" "03:04:03.00Z" "03:06:03.00Z" "03:08:03.00Z"
## [245] "03:10:03.00Z" "03:12:03.00Z" "03:14:03.00Z" "03:16:03.00Z"
## [249] "03:18:03.00Z" "03:20:03.00Z" "03:22:03.00Z" "03:24:03.00Z"
## [253] "03:26:03.00Z" "03:28:03.00Z" "03:30:03.00Z" "03:32:03.00Z"
## [257] "03:34:03.00Z" "03:36:03.00Z" "03:38:03.00Z" "03:40:03.00Z"
## [261] "03:42:03.00Z" "03:44:03.00Z" "03:46:03.00Z" "03:48:03.00Z"
## [265] "03:50:03.00Z" "03:52:03.00Z" "03:54:03.00Z" "03:56:03.00Z"
## [269] "03:58:03.00Z" "04:00:03.00Z" "04:02:03.00Z" "04:04:03.00Z"
## [273] "04:06:03.00Z" "04:08:03.00Z" "04:10:03.00Z" "04:12:03.00Z"
## [277] "04:14:03.00Z" "04:16:03.00Z" "04:18:03.00Z" "04:20:03.00Z"
## [281] "04:22:03.00Z" "04:24:03.00Z" "04:26:03.00Z" "04:28:03.00Z"
## [285] "04:30:03.00Z" "04:32:03.00Z" "04:34:03.00Z" "04:36:03.00Z"
## [289] "04:38:03.00Z" "04:40:03.00Z" "04:42:03.00Z" "04:44:03.00Z"
## [293] "04:46:03.00Z" "04:48:03.00Z" "04:50:03.00Z" "04:52:03.00Z"
## [297] "04:54:03.00Z" "04:56:03.00Z" "04:58:03.00Z" "05:00:03.00Z"
## [301] "05:02:03.00Z" "05:04:03.00Z" "05:06:03.00Z" "05:08:03.00Z"
## [305] "05:10:03.00Z" "05:12:03.00Z" "05:14:03.00Z" "05:16:03.00Z"
## [309] "05:18:03.00Z" "05:20:03.00Z" "05:22:03.00Z" "05:24:03.00Z"
## [313] "05:26:03.00Z" "05:28:03.00Z" "05:30:03.00Z" "05:32:03.00Z"
## [317] "05:34:03.00Z" "05:36:03.00Z" "05:38:03.00Z" "05:40:03.00Z"
## [321] "05:42:03.00Z" "05:44:03.00Z" "05:46:03.00Z" "05:48:03.00Z"
## [325] "05:50:03.00Z" "05:52:03.00Z" "05:54:03.00Z" "05:56:03.00Z"
## [329] "05:58:03.00Z" "06:00:03.00Z" "06:02:03.00Z" "06:04:03.00Z"
## [333] "06:06:03.00Z" "06:08:03.00Z" "06:10:03.00Z" "06:12:03.00Z"
## [337] "06:14:03.00Z" "06:16:03.00Z" "06:18:03.00Z" "06:20:03.00Z"
## [341] "06:22:03.00Z" "06:24:03.00Z" "06:26:03.00Z" "06:28:03.00Z"
## [345] "06:30:03.00Z" "06:32:03.00Z" "06:34:03.00Z" "06:36:03.00Z"
## [349] "06:38:03.00Z" "06:40:03.00Z" "06:42:03.00Z" "06:44:03.00Z"
## [353] "06:46:03.00Z" "06:48:03.00Z" "06:50:03.00Z" "06:52:03.00Z"
## [357] "06:54:03.00Z" "06:56:03.00Z" "06:58:03.00Z" "07:00:03.00Z"
## [361] "07:02:03.00Z" "07:04:03.00Z" "07:06:03.00Z" "07:08:03.00Z"
## [365] "07:10:03.00Z" "07:12:03.00Z" "07:14:03.00Z" "07:16:03.00Z"
## [369] "07:18:03.00Z" "07:20:03.00Z" "07:22:03.00Z" "07:24:03.00Z"
## [373] "07:26:03.00Z" "07:28:03.00Z" "07:30:03.00Z" "07:32:03.00Z"
## [377] "07:34:03.00Z" "07:36:03.00Z" "07:38:03.00Z" "07:40:03.00Z"
## [381] "07:42:03.00Z" "07:44:03.00Z" "07:46:03.00Z" "07:48:03.00Z"
## [385] "07:50:03.00Z" "07:52:03.00Z" "07:54:03.00Z" "07:56:03.00Z"
## [389] "07:58:03.00Z" "08:00:03.00Z" "08:02:03.00Z" "08:04:03.00Z"
## [393] "08:06:03.00Z" "08:08:03.00Z" "08:10:03.00Z" "08:12:03.00Z"
## [397] "08:14:03.00Z" "08:16:03.00Z" "08:18:03.00Z" "08:20:03.00Z"
## [401] "08:22:03.00Z" "08:24:03.00Z" "08:26:03.00Z" "08:28:03.00Z"
## [405] "08:30:03.00Z" "08:32:03.00Z" "08:34:03.00Z" "08:36:03.00Z"
## [409] "08:38:03.00Z" "08:40:03.00Z" "08:42:03.00Z" "08:44:03.00Z"
## [413] "08:46:03.00Z" "08:48:03.00Z" "08:50:03.00Z" "08:52:03.00Z"
## [417] "08:54:03.00Z" "08:56:03.00Z" "08:58:03.00Z" "09:00:03.00Z"
## [421] "09:02:03.00Z" "09:04:03.00Z" "09:06:03.00Z" "09:08:03.00Z"
## [425] "09:10:03.00Z" "09:12:03.00Z" "09:14:03.00Z" "09:16:03.00Z"
## [429] "09:18:03.00Z" "09:20:03.00Z" "09:22:03.00Z" "09:24:03.00Z"
## [433] "09:26:03.00Z" "09:28:03.00Z" "09:30:03.00Z" "09:32:03.00Z"
## [437] "09:34:03.00Z" "09:36:03.00Z" "09:38:03.00Z" "09:40:03.00Z"
## [441] "09:42:03.00Z" "09:44:03.00Z" "09:46:03.00Z" "09:48:03.00Z"
## [445] "09:50:03.00Z" "09:52:03.00Z" "09:54:03.00Z" "09:56:03.00Z"
## [449] "09:58:03.00Z" "10:00:03.00Z" "10:02:03.00Z" "10:04:03.00Z"
## [453] "10:06:03.00Z" "10:08:03.00Z" "10:10:03.00Z" "10:12:03.00Z"
## [457] "10:14:03.00Z" "10:16:03.00Z" "10:18:03.00Z" "10:20:03.00Z"
## [461] "10:22:03.00Z" "10:24:03.00Z" "10:26:03.00Z" "10:28:03.00Z"
## [465] "10:30:03.00Z" "10:32:03.00Z" "10:34:03.00Z" "10:36:03.00Z"
## [469] "10:38:03.00Z" "10:40:03.00Z" "10:42:03.00Z" "10:44:03.00Z"
## [473] "10:46:03.00Z" "10:48:03.00Z" "10:50:03.00Z" "10:52:03.00Z"
## [477] "10:54:03.00Z" "10:56:03.00Z" "10:58:03.00Z" "11:00:03.00Z"
## [481] "11:02:03.00Z" "11:04:03.00Z" "11:06:03.00Z" "11:08:03.00Z"
## [485] "11:10:03.00Z" "11:12:03.00Z" "11:14:03.00Z" "11:16:03.00Z"
## [489] "11:18:03.00Z" "11:20:03.00Z" "11:22:03.00Z" "11:24:03.00Z"
## [493] "11:26:03.00Z" "11:28:03.00Z" "11:30:03.00Z" "11:32:03.00Z"
## [497] "11:34:03.00Z" "11:36:03.00Z" "11:38:03.00Z" "11:40:03.00Z"
## [501] "11:42:03.00Z" "11:44:03.00Z" "11:46:03.00Z" "11:48:03.00Z"
## [505] "11:50:03.00Z" "11:52:03.00Z" "11:54:03.00Z" "11:56:03.00Z"
## [509] "11:58:03.00Z" "12:00:03.00Z" "12:02:03.00Z" "12:04:03.00Z"
## [513] "12:06:03.00Z" "12:08:03.00Z" "12:10:03.00Z" "12:12:03.00Z"
## [517] "12:14:03.00Z" "12:16:03.00Z" "12:18:03.00Z" "12:20:03.00Z"
## [521] "12:22:03.00Z" "12:24:03.00Z" "12:26:03.00Z" "12:28:03.00Z"
## [525] "12:30:03.00Z" "12:32:03.00Z" "12:34:03.00Z" "12:36:03.00Z"
## [529] "12:38:03.00Z" "12:40:03.00Z" "12:42:03.00Z" "12:44:03.00Z"
## [533] "12:46:03.00Z" "12:48:03.00Z" "12:50:03.00Z" "12:52:03.00Z"
## [537] "12:54:03.00Z" "12:56:03.00Z" "12:58:03.00Z" "13:00:03.00Z"
## [541] "13:02:03.00Z" "13:04:03.00Z" "13:06:03.00Z" "13:08:03.00Z"
## [545] "13:10:03.00Z" "13:12:03.00Z" "13:14:03.00Z" "13:16:03.00Z"
## [549] "13:18:03.00Z" "13:20:03.00Z" "13:22:03.00Z" "13:24:03.00Z"
## [553] "13:26:03.00Z" "13:28:03.00Z" "13:30:03.00Z" "13:32:03.00Z"
## [557] "13:34:03.00Z" "13:36:03.00Z" "13:38:03.00Z" "13:40:03.00Z"
## [561] "13:42:03.00Z" "13:44:03.00Z" "13:46:03.00Z" "13:48:03.00Z"
## [565] "13:50:03.00Z" "13:52:03.00Z" "13:54:03.00Z" "13:56:03.00Z"
## [569] "13:58:03.00Z" "14:00:03.00Z" "14:02:03.00Z" "14:04:03.00Z"
## [573] "14:06:03.00Z" "14:08:03.00Z" "14:10:03.00Z" "14:12:03.00Z"
## [577] "14:14:03.00Z" "14:16:03.00Z" "14:18:03.00Z" "14:20:03.00Z"
## [581] "14:22:03.00Z" "14:24:03.00Z" "14:26:03.00Z" "14:28:03.00Z"
## [585] "14:30:03.00Z" "14:32:03.00Z" "14:34:03.00Z" "14:36:03.00Z"
## [589] "14:38:03.00Z" "14:40:03.00Z" "14:42:03.00Z" "14:44:03.00Z"
## [593] "14:46:03.00Z" "14:48:03.00Z" "14:50:03.00Z" "14:52:03.00Z"
## [597] "14:54:03.00Z" "14:56:03.00Z" "14:58:03.00Z" "15:00:03.00Z"
## [601] "15:02:03.00Z" "15:04:03.00Z" "15:06:03.00Z" "15:08:03.00Z"
## [605] "15:10:03.00Z" "15:12:03.00Z" "15:14:03.00Z" "15:16:03.00Z"
## [609] "15:18:03.00Z" "15:20:03.00Z" "15:22:03.00Z" "15:24:03.00Z"
## [613] "15:26:03.00Z" "15:28:03.00Z" "15:30:03.00Z" "15:32:03.00Z"
## [617] "15:34:03.00Z" "15:36:03.00Z" "15:38:03.00Z" "15:40:03.00Z"
## [621] "15:42:03.00Z" "15:44:03.00Z" "15:46:03.00Z" "15:48:03.00Z"
## [625] "15:50:03.00Z" "15:52:03.00Z" "15:54:03.00Z" "15:56:03.00Z"
## [629] "15:58:03.00Z" "16:00:03.00Z" "16:02:03.00Z" "16:04:03.00Z"
## [633] "16:06:03.00Z" "16:08:03.00Z" "16:10:03.00Z" "16:12:03.00Z"
## [637] "16:14:03.00Z" "16:16:03.00Z" "16:18:03.00Z" "16:20:03.00Z"
## [641] "16:22:03.00Z" "16:24:03.00Z" "16:26:03.00Z" "16:28:03.00Z"
## [645] "16:30:03.00Z" "16:32:03.00Z" "16:34:03.00Z" "16:36:03.00Z"
## [649] "16:38:03.00Z" "16:40:03.00Z" "16:42:03.00Z" "16:44:03.00Z"
## [653] "16:46:03.00Z" "16:48:03.00Z" "16:50:03.00Z" "16:52:03.00Z"
## [657] "16:54:03.00Z" "16:56:03.00Z" "16:58:03.00Z" "17:00:03.00Z"
## [661] "17:02:03.00Z" "17:04:03.00Z" "17:06:03.00Z" "17:08:03.00Z"
## [665] "17:10:03.00Z" "17:12:03.00Z" "17:14:03.00Z" "17:16:03.00Z"
## [669] "17:18:03.00Z" "17:20:03.00Z" "17:22:03.00Z" "17:24:03.00Z"
## [673] "17:26:03.00Z" "17:28:03.00Z" "17:30:03.00Z" "17:32:03.00Z"
## [677] "17:34:03.00Z" "17:36:03.00Z" "17:38:03.00Z" "17:40:03.00Z"
## [681] "17:42:03.00Z" "17:44:03.00Z" "17:46:03.00Z" "17:48:03.00Z"
## [685] "17:50:03.00Z" "17:52:03.00Z" "17:54:03.00Z" "17:56:03.00Z"
## [689] "17:58:03.00Z" "18:00:03.00Z" "18:02:03.00Z" "18:04:03.00Z"
## [693] "18:06:03.00Z" "18:08:03.00Z" "18:10:03.00Z" "18:12:03.00Z"
## [697] "18:14:03.00Z" "18:16:03.00Z" "18:18:03.00Z" "18:20:03.00Z"
## [701] "18:22:03.00Z" "18:24:03.00Z" "18:26:03.00Z" "18:28:03.00Z"
## [705] "18:30:03.00Z" "18:32:03.00Z" "18:34:03.00Z" "18:36:03.00Z"
## [709] "18:38:03.00Z" "18:40:03.00Z" "18:42:03.00Z" "18:44:03.00Z"
## [713] "18:46:03.00Z" "18:48:03.00Z" "18:50:03.00Z" "18:52:03.00Z"
## [717] "18:54:03.00Z" "18:56:03.00Z" "18:58:03.00Z" "19:00:03.00Z"

We can tell that the time is incresing by the result above, along with the attribute information of time from the metadata file.
Because the time is always increasing, we can just use the index number, i.e., the first column as the time axis for now.

The wording of the metadata is confusing (and wrong) - that two minute sampling interval doesn’t mean that the instrument sampled for two minutes, rather, two minutes is the “time per ensemble”, which is defined as the “minimum interval between data collection cycles”. So all that means is that the ADCP sampled every two minutes, but not that data collection lasted a full two minutes. The metadata further states that the unit sampled 40 pings per ensemble, but if you look at the data you actually have 20 pings per ensemble. What the metadata and CSV don’t tell me is the TP - or the time between pings, so there’s no real way to tell from this how those 20 pings were spaced out. The unit could have sent out 1 ping per second for 20 seconds, then shut down for 1 minute and 40 seconds, or it could have spread them out further during that two minute ensemble. the ping in row 1 happened before the ping in row 2, and so on

ggplot(data = d203, aes(x=X, y=height)) +
  geom_bar(stat="identity", fill = "lightblue") +
  theme_minimal()

ggplot(data = d203, aes(x=X, y=depth)) +
  geom_bar(stat="identity", fill = "lightblue") +
  theme_minimal()

ggplot(data = d203, aes(x=X, y=waterdepth)) +
  geom_line(color = "lightblue") +
  theme_minimal()

ggplot(data = d203, aes(x=X, y=temp_c)) +
  geom_line(color = "lightblue") +
  theme_minimal()

ggplot(data = d203, aes(x=X, y=pressure)) +
  geom_point(color = "lightblue") +
  theme_minimal()

ggplot(data = d203, aes(x=X, y=data_quality)) +
  geom_point(color = "lightblue") +
  theme_minimal()

ggplot(data = d203, aes(x=X, y=eastward)) +
  geom_point(color = "lightblue") +
  theme_minimal()

It looks dense so we extract part of it to show the pattern:

ggplot(data = head(d203, 500), aes(x=X, y=eastward)) +
  geom_line(color = "lightblue") +
  ggtitle('first 500 eastward') + 
  theme_minimal()

ggplot(data = d203, aes(x=X, y=northward)) +
  geom_line(color = "lightblue") +
  theme_minimal()

Similar as above:

ggplot(data = head(d203, 500), aes(x=X, y=northward)) +
  geom_line(color = "lightblue") +
  ggtitle('first 500 northward') + 
  theme_minimal()

ggplot(data = d203, aes(x=X, y=upwards)) +
  geom_line(color = "lightblue") +
  theme_minimal()

ggplot(data = head(d203, 500), aes(x=X, y=upwards)) +
  geom_line(color = "lightblue") +
  ggtitle('first 500 northward') + 
  theme_minimal()